package org.lg.dto;



/**
 * 消息的枚举 就是把所有的消息可能都列出来的
 */
//查询全部学生为例  查询成功   查询失败  当前没有数据
public enum MessageEnum {
     // 学生管理模块的提示
    GETALLSTUDENTSUCCESS(200, Messages.GETALLSTUDENTSUCCESS),
    GETSTUDENTBYIDSUCCESS(200, Messages.GETSTUDENTBYIDSUCCESS),
    GETSTUDENTBYIDFAIL(200, Messages.GETSTUDENTBYIDFAIL),
    ADDSTUDENTSUCCESS(200,Messages.ADDTEACHERSUCCESS),
    //教师模块
    GETEACHERSUCCESS(200,Messages.GETEACHERSUCCESS),
    ADDTEACHERSUCCESS(200,Messages.ADDTEACHERSUCCESS),
    GETALLTEACHERSUCCESS(200, Messages.GETALLTEACHERSUCCESS),
    GETTEACHERBYIDSUCCESS(200, Messages.GETTEACHERBYIDSUCCESS),
    GETTEACHERBYIDFAIL(200, Messages.GETTEACHERBYIDFAIL),

    //登录
    LOGINSUCCESS(200, Messages.LOGINSUCCESS),
    LOGINUSERNAMEFAIL(403, Messages.LOGINUSERNAMEFAIL),
    LOGINPASSWORDFAIL(403, Messages.LOGINPASSWORDFAIL)

    ;
    private Integer code;//状态码
    private String message;




    MessageEnum() {
    }

    public Integer getCode() {
        return code;
    }

    MessageEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
